package ${basePackage}.cli.command;

import cn.hutool.core.util.ReflectUtil;
import ${basePackage}.model.DataModel;
import picocli.CommandLine.Command;

import java.lang.reflect.Field;

/**
 * <p>Title: 输出允许用户传入的动态参数的信息</p>
 * <p>Description: </p>
 *
 * @author su.gd
 * @date 2023-11-22
 */
@Command(name = "config", description = "查看更多参数信息", mixinStandardHelpOptions = true)
public class ConfigCommand implements Runnable {


    /**
     * 实现 config 命令的逻辑
     */
    @Override
    public void run() {
        System.out.println("查看参数信息：");

        Field[] fields = ReflectUtil.getFields(DataModel.class);

        for (Field field : fields) {
            System.out.println("字段名称：" + field.getName());
            System.out.println("字段类型：" + field.getType());
            System.out.println("---------------");
        }

    }
}
